import request from "@/utils"

export function getHouseList(params) {
    return request({
        url: '/properties',
        params
    })
}

export function addHouse(data) {
    return request({
        url: '/properties',
        method: 'post',
        data
    })
}

export function getHouseById(id) {
    return request({
        url: `/properties/${id}`
    })
}

export function delHouse(id) {
    return request({
        url: `/properties/${id}`,
        method: 'delete'
    })
}

export function updateHouse(data) {
    return request({
        url: `/properties/${data.id}`,
        method: 'put',
        data
    })
}